package cn.com.cfae.iras.doc.analyze.parse.model;

import com.google.gson.JsonElement;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.List;

/**
 * 文档页模型
 */
public class PageModel {

    public double topMargin = 50.0;
    public double leftMargin = 10.0;
    public double bottomMargin = 50.0;
    public double rightMargin = 20.0;


    private static Logger logger = LoggerFactory.getLogger(PageModel.class);
    private int pageNumber;

    private JsonElement jsonTextData;

    private JsonElement jsonTableData;

    public List<String> getTableDataList() {
        return tableDataList;
    }

    public void setTableDataList(List<String> tableDataList) {
        this.tableDataList = tableDataList;
    }

    List<String> tableDataList= null;

    public int getPageNumber() {
        return pageNumber;
    }

    public void setPageNumber(int pageNumber) {
        this.pageNumber = pageNumber;
    }

    public JsonElement getJsonTextData() {
        return jsonTextData;
    }

    public void setJsonTextData(JsonElement jsonTextData) {
        this.jsonTextData = jsonTextData;
    }

    public JsonElement getJsonTableData() {
        return jsonTableData;
    }

    public void setJsonTableData(JsonElement jsonTableData) {
        this.jsonTableData = jsonTableData;
    }

    public ChapterModel getChapterModel() {
        return chapterModel;
    }

    public void setChapterModel(ChapterModel chapterModel) {
        this.chapterModel = chapterModel;
    }

    /**
     * 属于哪个章节
     */
    private ChapterModel chapterModel;

    public double getWidth() {
        return width;
    }

    public void setWidth(double width) {
        this.width = width;
    }

    public double getHeight() {
        return height;
    }

    public void setHeight(double height) {
        this.height = height;
    }


    private double width;
    private double height;

    public PageArea getDefaultPageArea() {
        return new PageArea(getPageNumber(), topMargin, leftMargin, getHeight(), getWidth());
    }
}
